<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd"
             id="definitions"
             name="camunda"
             namespace="http://camunda.org/schema/1.0/dmn">
  <decision id="decision" name="CheckOrder">
    <decisionTable id="decisionTable">
      <input id="clause1" label="CustomerStatus">
        <inputExpression id="inputExpression1" typeRef="string">
          <text>status</text>
        </inputExpression>
      </input>
      <input id="clause2" label="OrderSum">
        <inputExpression id="inputExpression2" typeRef="double">
          <text>sum</text>
        </inputExpression>
      </input>
      <output id="clause3" label="Check Result" name="result" typeRef="string" />
      <output id="clause4" label="Reason" name="reason" />
      <rule id="rule1">
        <inputEntry>
          <text>cellInput == "bronze"</text>
        </inputEntry>
        <inputEntry>
          <text/>
        </inputEntry>
        <outputEntry>
          <text>"notok"</text>
        </outputEntry>
        <outputEntry>
          <text><![CDATA["work on your status first, as bronze you're not going to get anything"]]></text>
        </outputEntry>
      </rule>
      <rule id="rule2">
        <inputEntry>
          <text>cellInput == "silver"</text>
        </inputEntry>
        <inputEntry>
          <text><![CDATA[cellInput < 1000]]></text>
        </inputEntry>
        <outputEntry>
          <text>"ok"</text>
        </outputEntry>
        <outputEntry>
          <text>"you little fish will get what you want"</text>
        </outputEntry>
      </rule>
      <rule id="rule3">
        <inputEntry>
          <text>cellInput == "silver"</text>
        </inputEntry>
        <inputEntry>
          <text><![CDATA[cellInput >= 1000]]></text>
        </inputEntry>
        <outputEntry>
          <text>"notok"</text>
        </outputEntry>
        <outputEntry>
          <text>"you took too much man, you took too much!"</text>
        </outputEntry>
      </rule>
      <rule id="rule4">
        <inputEntry>
          <text>cellInput == "gold"</text>
        </inputEntry>
        <inputEntry>
          <text/>
        </inputEntry>
        <outputEntry>
          <text>"ok"</text>
        </outputEntry>
        <outputEntry>
          <text>"you get anything you want"</text>
        </outputEntry>
      </rule>
    </decisionTable>
  </decision>
</definitions>
